package com.DHH.Entity.Identity;
import com.DHH.Entity.Base.BaseUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.sql.Timestamp;
import java.util.Date;
import java.util.Set;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 实体类IdentityAuthentication
 * 数据表identity_tb_authentication
 * 身份认证表
 * 2017-8-3 12:33:07
 * @author Administrator
 *
 */
@Table(name = "identity_tb_authentication")
public class IdentityAuthentication  implements Serializable {

	//
	@Id
	@GeneratedValue(generator = "JDBC")
	private Integer id;
	//
	private Integer userId;
	//真实姓名
	@Length(max = 12, min = 0, message = "真实姓名长度为0-12个字符")
	private String realName;
	//身份证号码(注意加密)
	@Length(max = 128, min = 0, message = "身份证号码(注意加密)长度为0-128个字符")
	private String idCardNumber;
	//联系地址
	@Length(max = 128, min = 0, message = "联系地址长度为0-32个字符")
	private String contactAddress;
	//身份正正面照片（注意加密）
	private Integer idCardFrontImg;
	//
	private Integer idCardBackImg;
	//学生正照片(注意加密)存储二进制数据
	@NotNull(message = "学生正照片(注意加密)存储二进制数据不能为空")
	private Integer stuCardImg;
	//
	private Integer stateId;

	private Date createTime;
	@Transient
	private BaseUser baseUser;
	@Transient
	private IdentityAuthenticationState identityAuthenticationState;

	public IdentityAuthentication(){

	}

	public void setId(Integer id){
		this.id=id;
	}

	public Integer getId(){
		return this.id;
	}
	public void setUserId(Integer userId){
		this.userId=userId;
	}

	public Integer getUserId(){
		return this.userId;
	}
	public void setRealName(String realName){
		this.realName=realName;
	}

	public String getRealName(){
		return this.realName;
	}
	public void setIdCardNumber(String idCardNumber){
		this.idCardNumber=idCardNumber;
	}

	public String getIdCardNumber(){
		return this.idCardNumber;
	}
	public void setContactAddress(String contactAddress){
		this.contactAddress=contactAddress;
	}

	public String getContactAddress(){
		return this.contactAddress;
	}
	public void setIdCardFrontImg(Integer idCardFrontImg){
		this.idCardFrontImg=idCardFrontImg;
	}

	public Integer getIdCardFrontImg(){
		return this.idCardFrontImg;
	}
	public void setIdCardBackImg(Integer idCardBackImg){
		this.idCardBackImg=idCardBackImg;
	}

	public Integer getIdCardBackImg(){
		return this.idCardBackImg;
	}
	public void setStuCardImg(Integer stuCardImg){
		this.stuCardImg=stuCardImg;
	}

	public Integer getStuCardImg(){
		return this.stuCardImg;
	}
	public void setStateId(Integer stateId){
		this.stateId=stateId;
	}

	public Integer getStateId(){
		return this.stateId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public BaseUser getBaseUser() {
		return baseUser;
	}

	public void setBaseUser(BaseUser baseUser) {
		this.baseUser = baseUser;
	}

	public IdentityAuthenticationState getIdentityAuthenticationState() {
		return identityAuthenticationState;
	}

	public void setIdentityAuthenticationState(IdentityAuthenticationState identityAuthenticationState) {
		this.identityAuthenticationState = identityAuthenticationState;
	}

	@Override
	public String toString() {
		return "IdentityAuthentication{" +
				"id=" + id +
				", userId=" + userId +
				", realName='" + realName + '\'' +
				", idCardNumber='" + idCardNumber + '\'' +
				", contactAddress='" + contactAddress + '\'' +
				", idCardFrontImg=" + idCardFrontImg +
				", idCardBackImg=" + idCardBackImg +
				", stuCardImg=" + stuCardImg +
				", stateId=" + stateId +
				", createTime=" + createTime +
				", baseUser=" + baseUser +
				", identityAuthenticationState=" + identityAuthenticationState +
				'}';
	}
}
